<template>
    <!-- 投保单上传下载 -->
    <div>
    <policy-list v-if="show" :type="'上传下载'" @goUploade="goUploade" ref="list">
    </policy-list>
    <el-dialog title="上传投保单" :visible.sync="uploade" v-if="uploade" >
          <upload-file :id="id" @close="close">
          </upload-file>
        </el-dialog>
    </div>
</template>

<script>
import uploadFile from "@/components/Sell/uploadFile";
import PolicyList from "@/components/Sell/PolicyList";

export default {
  data() {
    return {
      show: false,
      uploade: false,
      id: ""
    };
  },
  components: {
    "policy-list": PolicyList,
    "upload-file": uploadFile
  },
  methods: {
    goUploade(id) {
      // console.log(id);
      this.uploade = true;
      this.id = id;
    },
    close() {
      this.$refs.list.getDate();
      this.uploade = false;
    }
  },
  activated() {
    this.show = true;
    try {
      this.$refs.list.getDate();
    } catch (error) {}
  }
};
</script>

<style>

</style>
